<template>
  <footer class="footer">
    <span class="todo-count">剩余<strong>数量值 {{arr.length}}</strong></span>
    <ul class="filters">
      <li @click="btn('all')">
        <a :class="{selected : isH==='all'}" href="javascript:;">全部</a>
      </li>
      <li @click="btn('no')">
        <a :class="{selected : isH==='no'}" href="javascript:;">未完成</a>
      </li>
      <li @click="btn('ok')">
        <a :class="{selected : isH==='ok'}" href="javascript:;">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="qingFN">清除已完成</button>
  </footer>
</template>

<script>
  export default {
    props: ['arr'],
    data() {
      return {
        isH: 'all',
      }
    },
    methods: {
      btn(str) {
        this.isH = str
        this.$emit('love', str)
      },
      qingFN() {
        this.$emit('qing')
      }
    },

  }
</script>